home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998…eptember: Technology Seed / September 98 ADC Seed CD.toast / FireWire 1.1 DR2 SDK / Source / FWiX / FWiXApp / FWiXdrag.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-15  |  3.3 KB  |  145 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        FWXdrag.h
  3.  
  4.     Contains:    Definitions for FireWire Exchange application.
  5.  
  6.     Version:    1.0
  7.  
  8.     Written by:    Jay Lloyd
  9.  
  10.     Copyright:    © 1996-1997 by Apple Computer, Inc., all rights reserved.
  11.  
  12.     File Ownership:
  13.  
  14.         DRI:                Jay Lloyd
  15.  
  16.         Other Contact:        
  17.  
  18.         Technology:            FireWire
  19.  
  20.     Writers:
  21.  
  22.         (jkl)    Jay Lloyd
  23.  
  24.     Change History (most recent first):
  25.  
  26.       <FW10>      5/7/97    jkl        Updated list data structures to be double linked lists.
  27.        <FW9>     3/18/97    jkl        Added definitions for icon and name drqag hiliting.
  28.        <FW8>     2/27/97    jkl        Updated grid spacing for better scrolling support.
  29.        <FW7>     2/21/97    jkl        Modified grid constants for sender window icon placement.
  30.        <FW6>      2/6/97    ES        Added list of nodes we've opened to the WindowData record.
  31.        <FW5>     1/27/97    jkl        Added a timer task record and send items precheck list to the
  32.                                     receive node record.
  33.        <FW4>     1/16/97    jkl        Added user interface features for alpha candidate. Added scroll
  34.                                     bars and windowView to window data. Modified sizes and spacing
  35.                                     for window icons.
  36.        <FW3>      1/8/97    ES        Changed to use FWX nodes instead of FWX drivers.
  37.        <FW2>    11/13/96    jkl        Added receive node name to receiver record.
  38.        <FW1>     10/2/96    jkl        initial check-in
  39. */
  40.  
  41. #ifndef __FWXDRAG__
  42. #define __FWXDRAG__
  43.  
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47.  
  48. #if PRAGMA_IMPORT_SUPPORTED
  49. #pragma import on
  50. #endif
  51.  
  52. #if PRAGMA_ALIGN_SUPPORTED
  53. #pragma options align=mac68k
  54. #endif
  55.  
  56. //    My AppleEvent ID defs
  57. enum
  58. {
  59.     kPrivateEventClass        = 'Sprv',
  60.     kAEFileSpecList            = 'FSpL',
  61.     kAEFSSpecKey            = 'FSpK',
  62.     kAEFSSpecCountKey        = 'FSpC'
  63. };
  64.  
  65. // drag handling constants
  66. enum
  67. {
  68.     kNoSpace        = -1,
  69.     kHiliteInit        = 1,
  70.     kHiliteOn        = 2,
  71.     kHiliteOff        = 3,
  72.     kHiliteDispose    = 4
  73. };
  74.     
  75. // icon drawing constants
  76. enum
  77. {
  78.     kLargeIconFill    = 32,
  79.     kLargeHFill        = 48,
  80.     kLargeHSize        = 128,
  81.     kLargeVFill        = 9,
  82.     kLargeVSize        = 64,
  83.     kLargeRowCount    = 5,
  84.     
  85.     kSmallIconFill    = 16,
  86.     kSmallHFill        = 20,
  87.     kSmallHSize        = 170,
  88.     kSmallVFill        = 10,
  89.     kSmallVSize        = 24,
  90.     kSmallRowCount    = 10,
  91.     
  92.     kLargeIconView    = 1,
  93.     kSmallIconView    = 2    
  94. };
  95.  
  96. typedef struct OpenNodeRecord    OpenNodeRecord,
  97.                                 *OpenNodePtr;
  98. struct OpenNodeRecord
  99. {
  100.     OpenNodePtr        pNextNode,                // keeps the node list
  101.                     pPreviousNode;
  102.     FWXNodeID        nodeID;                    // firewire node id
  103. };
  104.  
  105. typedef struct RecvNodeRecord    RecvNodeRecord,
  106.                                 *RecvNodePtr;
  107. struct RecvNodeRecord
  108. {
  109.     RecvNodePtr        pNextNode,                // keeps list of nodes
  110.                     pPreviousNode;
  111.     Rect            recvNodeIconRect;        // Rect for node drag detection
  112.     Rect            recvNodeTextRect;        // Rect for node drag detection
  113.     FWXNodeID        nodeID;                    // node FireWire id
  114.     NodeSendItemPtr    pTxItemList;            // list of items to send
  115.     MyTMTaskPtr        pReplyTimer;            // timer record for waiting for reply
  116.     Str32            nodeName;                // macintosh name of node
  117. };
  118.  
  119. struct WindowData
  120. {
  121.     ControlHandle    hVScrollBar;        // vertical scroll bar
  122.     ControlHandle    hHScrollBar;        // horizontal scroll bar
  123.     OpenNodePtr        pOpenNodeList;        // points to first open node
  124.     SInt32            numOpenNodes;        // keeps count of opened nodes
  125.     RecvNodePtr        pRecvNodeList;        // points to first node with fwix running
  126.     SInt32            numRecvNodes;        // keeps count of nodes
  127.     SInt32            windowView;            // large or small icon
  128. };
  129. typedef struct WindowData    WindowData,
  130.                             *WindowDataPtr;
  131.  
  132.  
  133. #if PRAGMA_ALIGN_SUPPORTED
  134. #pragma options align=reset
  135. #endif
  136.  
  137. #if PRAGMA_IMPORT_SUPPORTED
  138. #pragma import off
  139. #endif
  140.  
  141. #ifdef __cplusplus
  142. }
  143. #endif
  144.  
  145. #endif